from pydantic import BaseModel
from typing import TypeVar, List, Optional
from schemas.activity import Activity
from fastapi.encoders import jsonable_encoder

from datetime import datetime


T = TypeVar("T", bound=BaseModel)


class RespBase(BaseModel):
    ret: int = 0
    ret_msg: str = "success"


class Resp(RespBase):
    pass


class RespList(RespBase):
    total: Optional[int] = None
    list: Optional[List[T]] = None


class RespInfo(RespBase):
    info: T


if __name__ == '__main__':

    RespList(total=10, data=["a"], s=2)
